package com.huawei.singleTon;

/**
 * Created by 魏生龙 on 2018/1/10.
 */
public class SingleTon {
    private static volatile SingleTon instance;
    private SingleTon(){};
    public static SingleTon getInstance(){
        if(instance==null){
            synchronized (SingleTon.class){
                if(instance==null){
                    instance=new SingleTon();
                }
            }
        }
        return instance;
    }

}
